package com.chii.color.task;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.time.LocalDateTime;

/**
 * @author 85387
 */
//主要用于标记配置类，兼备Component的效果。
@Configuration
// 开启定时任务
@EnableScheduling
public class ScheduleTask {
    private Logger logger = LogManager.getLogger(ScheduleTask.class);
    private static final long TIME = 60L * 24L * 60L * 60_000L;
    /**
     * 添加定时任务，每天凌晨四点
     */
//    @Scheduled(cron = "0 0 4 * * ?")
    private void deleteImageTask() {
        logger.info("执行静态定时任务时间1: " + LocalDateTime.now());


    }

}
